#include "../include/header.h"

/**
 * 孤儿进程
*/
int main(int argc, char* argv[]){
    pid_t pid;
    pid = fork() ;
    ERROR_CHECK(pid, -1, "fork");

    if(pid == 0){
        /*child*/
        printf("The child process, id = %d parent id = %d\n", getpid(), getppid());
        while(1);
    }else{
        /*parent*/
        printf("The parent process, id = %d\n", getpid ( ));
    }
    return 0 ;

}